<template>
    <div>Hello World</div>
    <button @click="checkUser">检查用户</button>
    <button @click="login">登录</button>
</template>

<script lang="ts" setup>
import { onMounted } from 'vue';
import router from '../router';
import auth from '../auth';

onMounted(async () => {
});
function checkUser(){
    auth.getUser().then(user=>{
        console.log(user);
    });
}
function login(){
    router.push('/authentication/login'); 
}
</script>
